Dynamic weather per theme: frost gusts, lava geysers, pollen drift - #10
Merged
Conversation
Each theme now has gameplay-tied environmental dynamics (new src/weather.ts): - Frostpeak: timed wind gusts (every ~8 s) streak across the screen, whoosh SFX, and shove Rex sideways (~55 px/s drift) for a couple of seconds. - Volcanic: big lava pools grow geyser vents that bubble to telegraph, then erupt a 1.4 s hot column that damages Rex and kicks him out. Vents derive from level geometry (pools >= 180 px wide), capped at 5. - Crystal Valley: slow pollen motes drift around Rex with a subtle sway. Forces use velocity blending so they survive the player's air drag. Reduced-motion mode suppresses the decorative particles but keeps the gust force and geyser damage. Weather updates during play and dying, draws in the foreground, and resets per level via buildLevel(). Validated: typecheck, 225/225 tests (+16 new: pure ventState/gusts/geysers/ drift + game integration), build (135.93 kB / 41.81 kB gzip), lint, and headless E2E (gust shove -50px, geyser eruption burns Rex 3->2 hearts, pollen present, zero page errors).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each theme now has gameplay-tied environmental dynamics (new
src/weather.ts):Forces use velocity blending so they survive the player's air drag. Reduced-motion mode suppresses the decorative particles but keeps the gust force and geyser damage. Weather updates during play and dying, draws in the foreground, and resets per level via
buildLevel().Validated locally (CI is failing for pre-existing unrelated reasons, so local validation is the gate):
npm run typecheck✓npm test— 225/225 (was 209; +16 new: pureventState/gusts/geysers/drift + game integration) ✓npm run build— 135.93 kB / 41.81 kB gzip ✓npm run lint✓Screenshots:
/tmp/tinyrex-e2e/01-gust.png,02-geyser.png,03-pollen.png